//cmd.c
#include "cmd.h"

static cmd_t cmd_find[] = {
	{"led on",LED_On},
	{"led off",LED_Off},

};

u32 cmd_num = sizeof(cmd_find) / sizeof(cmd_find[0]);

cmd_t* find_cmd(char* name){
	int i = 0;
	for(i = 0;i < cmd_num;i++)
	{
		if(!strcmp(name,cmd_find[i].name)){
			return &cmd_find[i];
		}
	}
	return 0;
}
